package com.system.appointment.task;

import com.system.appointment.service.AppointmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @className: AppointmentCancelSchedule
 * @description: TODO 类描述
 * @author: Li Chuanwei
 * @date: 2023/12/10 23:13
 * @Company: Copyright [日期] by [作者或个人]
 **/
@Component
public class AppointmentCancelSchedule {
    @Autowired
    private AppointmentService appointmentService;

    @Scheduled(cron = "0 0/1 * * * ?")
    public void cancelUnpaidAppointment() {
        System.out.println("定时任务");
        appointmentService.cancelUnpaidAppointment();
    }
}
